<template>
  <div style="width: 100%">
  <section class="container footer-container">
    <div class="container-box">
      <div class="logo" @click="jumpTo('/home')">
        <img style="cursor:pointer;" src="../../assets/images/foot-logo.png" v-imgError alt="" />
      </div>
      <div class="col">
        <div
          class="title"
          @click="menuHandle('cultivate', { type: 1, url: 'provideTraining' })"
        >
          提供服务
        </div>
        <!-- <li class="lis" @click="menuHandle('login')" v-if="!showBtn">
          提供实习
        </li> -->
        <!-- <li class="lis" @click="linkTo('https://www.datarer.com/admin/#/login')">
          提供招聘
        </li> -->
        <li
          class="lis"
          @click="menuHandle('cultivate', { type: 1, url: 'provideTraining' })"
        >
          教育培训
        </li>
        <li class="lis" @click="jumpTo('/productManage')">实践项目</li>
        <li class="lis" @click="jumpTo('/researchResult')">研究成果</li>
        <li class="lis" @click="jumpTo('/newsAction')">前沿资讯</li>
        <li class="lis" @click="jumpTo('/studentConsultation')">规划咨询</li>
        <!-- <li class="lis" @click="jumpTo('/otherServices?type=1')">往期活动</li> -->
        <li
          class="lis"
          @click="menuHandle('cultivate', { type: 1, url: 'overseaServices' })"
        >
          海外服务
        </li>
      </div>
      <div class="col">
        <div
          class="title"
          @click="menuHandle('cultivate', { type: 2, url: 'companyProfile' })"
        >
          关于我们
        </div>
        <li
          class="lis"
          @click="menuHandle('cultivate', { type: 2, url: 'companyProfile' })"
        >
          平台简介
        </li>
        <!-- <li class="lis" @click="jumpTo('/otherServices?type=2')">平台架构</li> -->
        <li class="lis" @click="jumpTo('/otherServices?type=1')">往期活动</li>
        <li
          class="lis"
          @click="menuHandle('cultivate', { type: 2, url: 'legalNotices' })"
        >
          法律声明
        </li>
        <li
          class="lis"
          @click="menuHandle('cultivate', { type: 2, url: 'disclaimer' })"
        >
          免责声明
        </li>
        <li
          class="lis"
          @click="menuHandle('cultivate', { type: 2, url: 'PrivacyPolicy' })"
        >
          隐私协议
        </li>
        <li
          class="lis"
          @click="menuHandle('cultivate', { type: 2, url: 'ServicePolicy' })"
        >
          服务协议
        </li>
      </div>
      <div class="col">
        <div
          class="title"
          @click="menuHandle('cultivate', { type: 3, url: 'helpCenter' })"
        >
          联系我们
        </div>
        <li
          class="lis"
          @click="menuHandle('cultivate', { type: 3, url: 'helpCenter' })"
        >
          帮助中心
        </li>
        <li
          class="lis"
          @click="menuHandle('cultivate', { type: 3, url: 'FAQ' })"
        >
          常见问题
        </li>
        <li
          class="lis"
          @click="
            menuHandle('cultivate', { type: 3, url: 'businessCooperations' })
          "
        >
          商务合作
        </li>
        <li
          class="lis"
          @click="menuHandle('cultivate', { type: 3, url: 'joinUs' })"
        >
          加入我们
        </li>
      </div>
      <div class="contact">
        <div class="icon-text">
          <img src="../../assets/images/phone.png" alt="" srcset="" />
          <p>+86-755-23372612 | +86-755-23372649</p>
        </div>
        <div class="icon-text">
          <img src="../../assets/images/email.png" alt="" srcset="" />
          <p>contact@datarer.com</p>
        </div>
        <div
          class="icon-text"
          style="border-bottom: 1px solid #bdbdbd; padding-bottom: 13px"
        >
          <img src="../../assets/images/local.png" alt="" srcset="" />
          <div style="overflow: hidden">
            <p>深圳市福田区深南大道1006号国际创新中心B座14-18楼</p>
            <p class="en-text">
              14-18th Floor, Block B,Shenzhen International Center No.1006
              Shennan Road,Futian District,Shenzhen,China
            </p>
          </div>
        </div>
        <p class="bottom-tips">
          未经数据学徒同意，不得转载本网站所有招聘信息及作品
        </p>
        <div class="tips2">广东省人社局电话：020-12333</div>
      </div>
      <div class="qecode">
        <img src="../../assets/images/home/qrcode.jpg" alt="" srcset="" />
        <p>微信公众号</p>
      </div>
    </div>
    <FooterCom />
  </section>
  <MobliePage
    @menuHandle="menuHandle"
    @jumpTo="jumpTo"
  />
  </div>
</template>

<script>
import { mapState } from "vuex";
import FooterCom from "../footer";
import MobliePage from './mobile/index.vue';
export default {
  // 组件名称
  name: "footerMenu",
  // 组件状态值
  data() {
    return {};
  },
  components: {
    FooterCom,
    MobliePage,
  },
  // 计算属性
  computed: {
    ...mapState(["USER_INFO", "userMobile"]),
    showBtn() {
      // 如果已经登录，不展示实习按钮
      return this.userMobile !== null && this.userMobile !== "";
    },
  },
  // 组件方法
  methods: {
    openPDF(pageUrl) {
      this.$router.push({
        name: "iframePage",
        query: { pageUrl, showMenu: true },
      });
    },
    linkTo(url) {
      window.open(url, "_blank");
    },
    jumpTo(route) {
      this.$router.push({ path: route });
    },
    menuHandle(routeName, query) {
      // if (!this.userMobile && ['login', 'home', 'studentStyle'].indexOf(routeName) === -1) {
      //   this.$confirm("请先登录", "提示", {
      //     confirmButtonText: "确定",
      //     cancelButtonText: "取消",
      //   })
      //     .then(() => {
      //       this.$router.push({ name: "login" });
      //     })
      //     .catch(() => {});
      //   return;
      // }
      if (routeName) {
        this.$router.push({ name: routeName, query: { ...query } });
      } else {
        this.$message.info("模块开发中，即将上线，敬请期待");
      }
    },
  },
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang='less' scope>
@media screen and (max-width: 750px) {
  #app {
    min-width: auto;
  }
  .footer-container {
    display: none !important;
  }
  .mobile-footer-page {
    display: block !important;
  }
}
</style>
<style lang="less" scoped>
.container {
  width: 100%;
  box-sizing: border-box;
  border-top: 1px solid #d4d6da;
  background: #f6f8fa;
  padding-top: 30px;
  .container-box {
    width: 1200px;
    margin: 0 auto 0;
    display: flex;
    justify-content: space-between;
    .logo {
      width: 126px;
      height: 55px;
      img {
        width: 100%;
        height: 55px;
      }
    }
    .col {
      text-align: left;
      .title {
        font-size: 18px;
        font-weight: 400;
        color: #37383d;
        line-height: 25px;
        margin-bottom: 10px;
        font-family: PingFangSC-Medium, PingFang SC;
        cursor: pointer;
      }
      .lis {
        font-size: 14px;
        font-weight: 400;
        color: #8b8b8b;
        line-height: 18px;
        margin-bottom: 8px;
        font-family: PingFangSC-Regular, PingFang SC;
        cursor: pointer;
      }
      .title:hover,
      .lis:hover {
        color: #2f8efe;
      }
    }
    .contact {
      max-width: 40%;
      padding-bottom: 20px;
      .icon-text {
        position: relative;
        padding-left: 50px;
        margin-bottom: 10px;
        img {
          width: 30px;
          position: absolute;
          left: 0;
          top: 0;
        }
        p {
          text-align: left;
          overflow: hidden;
          font-size: 16px;
          font-weight: 400;
          color: #37383d;
          line-height: 30px;
          font-family: PingFangSC-Regular, PingFang SC;
        }
        .en-text {
          font-size: 12px;
          font-family: PingFangSC-Regular, PingFang SC;
          font-weight: 400;
          color: #595757;
          line-height: 17px;
        }
      }
      .bottom-tips {
        font-size: 15px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: #bdbdbd;
        line-height: 17px;
        margin-bottom: 7px;
        text-align: center;
      }
    }
    .qecode {
      width: 110px;
      img {
        display: block;
        width: 110px;
        margin-bottom: 13px;
      }
      p {
        font-size: 14px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: #8b8b8b;
        line-height: 20px;
        text-align: center;
      }
    }
  }
  .tips2 {
    width: 100%;
    text-align: center;
    font-size: 15px;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: #c1c1c1;
    line-height: 17px;
  }
}
// @media only screen and (max-width: 1500px) {
//   .container-box {
//     max-width: 1000px !important;
//   }
// }
</style>
